package com.example.spring5.designmode.strategy;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * 策略模式
 * @Author: Hu Rui
 * @Date: 2021/11/12 11:23
 */
public class UserTest {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext afc = new AnnotationConfigApplicationContext(AppConfig.class);
        ConnectHelper connectHelper = afc.getBean("connectHelper", ConnectHelper.class);
        connectHelper.execute(StrategyEnum.HTTP, "处理策略");
    }
}
